package  
{
	import org.flixel.FlxSprite;
	import org.flixel.*;
	/**
	 * ...
	 * @author morgan
	 */
	public class BetweenStage extends FlxState
	{
		public var img:Class;
		public var time:Number = 5;
		public var next:GameState
		public function BetweenStage() 
		{
			
		}
		override public function create():void 
		{
			super.create();
			var bg:FlxSprite = new FlxSprite(0, 0, img);
			add(bg);
			FlxG.flash(0x000000, 1);
		}
		override public function update():void 
		{
			super.update();
			time -= FlxG.elapsed;
			if (time > 0 && time - FlxG.elapsed <= 0)
			{
				FlxG.fade(0x000000, 1);
			}
			if (time < -1)
			{
				FlxG.switchState(next);
			}
		}
		
	}

}